package com.qst.Serviceimpl;

import com.qst.Service.UserService;
import com.qst.dao.UserMapper;
import com.qst.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @packageName:com.qst.Serviceimpl
 * @className:UserServiceimpl
 * @Description:
 * @author:zhangyu
 * @date 2021/6/16 15:43
 **/

@Service
public class UserServiceimpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public void add(User user) {
        userMapper.add(user);
    }

    @Override
    public int delete(int id) {
        return userMapper.delete(id);
    }

    @Override
    public void update(User user) {

        userMapper.update(user);
    }

    @Override
    public List<User> query(int id) {
        List<User> user =  userMapper.query(id);
        return user;
    }

    @Override
    public List<User> userList(User user) {
        return userMapper.userList(user);
    }
}
